package com.fduss.artStore.service;

import com.fduss.artStore.entity.Artwork;
import com.fduss.artStore.entity.Genre;
import com.fduss.artStore.entity.Review;
import com.fduss.artStore.entity.Subject;

import java.util.List;

/**
 * @Author duocai wu
 * @Date 2017/6/24
 * @Time 18:47
 */
public interface ArtworkService {

    Artwork add(Artwork artwork, Genre genre, Subject subject);

    Artwork add(Artwork artwork);

    /**
     * delete the artwork
     *
     * @param artworkId
     */
    void delete(int artworkId);

    void update(Artwork artwork);

    int getCount();

    Artwork getOne(int artworkId);

    List<Artwork> search(String key);
    /**
     * 获取一些艺术品
     *
     * @param number
     * @return
     */
    List<Artwork> getSome(int number);

    List<Artwork> getOnePage(int pageIndex, int pageSize);

    List<Artwork> getByArtist(int artistId);

    List<Artwork> getByGallery(int galleryId);

    /**
     * @param artworkId the id of the artwork
     * @return
     */
    List<Review> getReviews(int artworkId);

    Genre getGenre(int artworkId);

    Subject getSubject(int artworkId);

    List<Genre> getAllGenres();

    List<Subject> getAllSubjects();
}
